package com.example.myui.activity;

import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.example.myui.R;
import com.jaeger.library.StatusBarUtil;

import qiu.niorgai.StatusBarCompat;

public class StatusActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_status);
//        StatusBarUtil.setTranslucent(this,StatusBarUtil.DEFAULT_STATUS_BAR_ALPHA);

    }

    public void doStatusBar(View view) {
//        StatusBarUtil.setTranslucent(this);
        //透明状态栏
        StatusBarCompat.translucentStatusBar(this);
        //SDK >= 21时, 取消状态栏的阴影
        StatusBarCompat.translucentStatusBar(this, true);
    }

    public void doAlpha(View view) {
        StatusBarCompat.setStatusBarColor(this, Color.RED,100);
    }
}
